import 'package:flutter/material.dart';
import 'package:goodhouse/pages/home/tab_index/index_navigator_item.dart';
//按钮设置
class IndexNavigator extends StatelessWidget {
  const IndexNavigator({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top: 6.0, bottom: 6.0),
      child: Wrap(
        alignment: WrapAlignment.spaceAround,
        children: indexNavigatorItemList
            .map((item) => InkWell(
          onTap: () {
            item.onTap!(context);
          },
          child: Column(
            children: [
              Image.asset(
                item.imageUri,
                width: 60.5,
              ),
              Text(
                item.title,
                style: TextStyle(
                  fontWeight: FontWeight.w500,
                  fontSize: 14.0,
                ),
              ),
            ],
          ),
        ))
            .toList(),
      ),
    );
  }
}
